<template>
    <el-dialog v-if="curShow" class="pop_dialog" :title="title" width="60vw" @close="$emit('close')" :visible.sync="curShow" :close-on-click-modal="false">
        <div class="formWarp">
            <slot></slot>
        </div>
        <slot name="footer">
            <span slot="footer" class="dialog-footer">
                <el-button @click="$emit('close')">取 消</el-button>
                <el-button type="primary" @click="$emit('enter')" v-if="isShowEnter">确 定</el-button>
            </span>
        </slot>
    </el-dialog>
    
</template>

<script>
export default {
    props: {
        title: {
            type: String,
            default: "提示"
        },
        isShow: {
            type: Boolean,
            default: false
        },
        isShowEnter: {
            type: Boolean,
            default: true
        }
    },
    watch: {
        isShow(nv, ov) {
            this.curShow = nv;
        }
    },
    data() {
        return {
            curShow: this.isShow
        }
    }
}
</script>

<style lang="scss" scoped>
.pop_dialog {
}

.el-dialog__wrapper{
    pointer-events:none;
    ::v-deep .el-dialog{
      pointer-events:auto;
    }
  }
</style>